package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.ShopService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @BelongsProject: sky-take-out
 * @Author: XieMingHui
 * @CreateTime: 2023-11-21  17:06
 * @Description: 店铺接口
 * @Version: 1.0
 */
@RestController
@RequestMapping("/admin/shop")
public class ShopController {
    @Resource
    private ShopService shopService;
    /**
     * 店铺状态
     * @author: XieMingHui
     * @param: []
     * @return: com.sky.result.Result<java.lang.Integer>
     **/
    @GetMapping("/status")
    public Result<Integer> shopStart(){
        return shopService.shopStart();
    }
    /**
     * 设置店铺状态
     * @author: XieMingHui
     * @param: [status]
     * @return: com.sky.result.Result<java.lang.String>
     **/
    @PutMapping("/{status}")
    public Result<String> setShopStart(@PathVariable String status){
        return shopService.setShopStart(status);
    }
}
